<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<input id="text" type="text"><button id="btn">切换</button>
		<br><br>
		<img id="img" src="">
		<script>
			let oText = document.getElementById('text');
			let oBtn = document.getElementById('btn');
			let oImg = document.getElementById('img');
			
			oBtn.onclick = function(){
				oImg.src = oText.value
			}
		</script>
	</body>
</html>
